
$(function(){

	YuXi.InfoQuery.init({	
		url:"InformationDispatch/getUserDispatchList.do",
		query:{
				taskType:0,
				currentPage:1
			},					
		success:function(data){					
				YuXi.Render.InformationSeach(data.list,4,"已派遣任务");//调用信息查询的页面渲染模块
			},
			getQueryParm:function(){
						var query={};
						query={
							taskType:0,
							currentPage:1
						}
						YuXi.InfoQuery.queryData=YuXi.ALLSearch.base(query);
					},
				error:function(){},
				/* selector:{
					nextPage:$("#nextPage"),
					prevPage:$("#prevPage"),
					firstPage:$("#headPage"),
					lastPage:$("#endPage"),
					totalPage:$("#totalPage")
					此项为默认项
				}	 */
		});		


  //跳转到详情界面
  $(document).on("click",".detail",function(){
	  var id= $(this).attr("data-id");
		var menuId=$("#menu-container").attr("menu-id");
		window.location.href = '../information/subDetailInfo.jsp?menuId='+menuId+'&detailId=' + id;
	
  })
 
	
		
		//导出任务派遣表
		$("#ExcelTasks").click(function(){
			var count=0;
			var check=$("input[name='idArray']");
			$(check).each(function(){
				if($(this).is(":checked"))
				  count++;
			});
	
			if(count!=0){
				return ture;
			}
			else{
				myTool.alert({		
					title:"提示",
					context:"请勾选信息",
					isMask:true,
					callback:function(){}
				})
				return false;
			}		
		})
		
		function modal(title,text){
			myTool.alert({		
				title:title,
				context:text,
				isMask:true,
				callback:function(){}
			});
		}
 
})